refactor converter