adding machine validation on submit