help with creating function from snippit