added the submit button + the functionality for submit and add