simplifyPath.cpp