updated to use 2 registers to read htif