minor edits, mostly related to function documentation