Write command, mostly implemented