removing unneccessary paths