set class correctly