initial physics engine implementation