validation and tests