Refactor the coverter