THO8: refactor