input form now checks to see if user has submitted form