added comments to most things