remove unnecessary paths