Changed how createPaths works