added comments to most methods