commandD() completed

everything is working
Todo:
- add full dealloc helper function for commandR()
- start commandW()