add alternate way of reading and storing opcodes

Read the main function first :)