Update code from MIPS-Simulator