added db validations to some classes