change the way it parse categories to match new api