generic case for addPaths