added comments to several undocumented functions