7617: refactor