changing the way dircetories are removed