merge & refactor