added setClass method