Update submit and register endpoints.
Update submit function