adding comments

Added some comments for clarity.