inserting check for already existing ting_objects, and moving code to insert ting_objects to make it accessible to other classes