added submit method to submit button