only minor change, add comments