update comments on main functions