Change categories to dictionary to access Category instance