2 first parts of HW3.