lab2 and lab3 complete version