2315: refactor