changed submit button function