added removeFirstPath option