better comment for shortenPath
removes unneeded function