everything up to form validation