minor edits to remove extra code