added submit button and updated js