hw2: problem 0 & 1