moving form functions to a new file