changed onClick to onsubmit