updated week-4-assignment-3 from POSA-14-schmidt.