check for class first