Update memory and cmd