updated 3D and include file to take care of singularities

3D test isn't working yet (need to track degeneracies)