Adding comments, understanding the code