Added solution to TODO item 2.d.