updated general pyclaw functions upto 3D