minor edits to code