minor edits to clean-up code