lab5-correct.s - part 3 implemented