[#847] refactor