first 2 parts of HW1