Updated order of vm code