Changed submit button function