implemented add and remove dir entry, untested
merged