cleaned up addOjbect script