added paramters to the submit function