force and velocity calculations implemented but not working correctly