Moved trSubmit code to its own named function