Added comments

added some comments describing what the code does