added comments

To help clarify certain parts of the code