7167: refactor