how to create functions