added action listeners for form buttons