code I received from a colleague that he needs somewhere public