getting BIH correctly with refactored cod