added more physics code