added removal of directories