edited subdivide.cpp and .h