refactored gii.