added new features for object and improved onBodyCreated callback