removing all the extra paths