change class to object