added refresh function to the submit button