lab1.s implemented