physics refactor