edits to methods, fixed iterator