Modifying to instantiate classes