Changed the way to create objects