validations and unit tests