moving physics code to separate module; removing error in sending