implemented week-6-assignment-5