tasks 1 & 4 of first homework