Replaced some of the assembler code