added comments describing the functionality of the code
SourceTree and github seem to be arguing with each other