moved data entry into form with validation