Data refactor to use map