seperate form from function