added the final task from the second homework