code refactor wtf country parser