check model instead of querying for classes, needs cleaning