changed to cartesian 3d implementation and modified makefile