adding method clear_objects()