validation and class instances