added loading feature to the submit form