Use map for data instead of list