refactor #571