more work on physics engine