added collision and boundary conditions, added call by reference