added comments

finally added comments to the bits that needed comments