minor
implmentation flatted to work for longer paths