split into more functions; added ability to try all possible validations