I had several working solutions and none of them was accepted. My solution right now looks almost as the one in the answer. The only difference I see, is that I am using map while CG is using their own object. So, what is wrong here? Is my solution wrong or it just does not follow the standards of CG?