added all the cases for the class types in mark()