changed the button type to submit