corrected sub path slicing