modified geom.cpp