add checks to prevent blank fields being submitted