submit function added on client side