add the write command as well