in-class validation