Task 1 from Problem Set 2

final correct version for this task