adding validation, correcting submit event