completed classOf function