moved duplicate code into physics::Body