added new createClass method