optimize the object