more work on physics simulation