fixed const correctness and added initializephysics