change object into class