physics logic full refactor