hw1,2 and Lab 1,2 solution