adding save method for form