It's "top of head" code so you may want to alter it a little.