minor edits, trying to accommodate a changing API