reset form function

added a reset form function