Solution to week-5-assignment-4