added some comments, here and there to make it even more clear. i guess.