added categoryid to formatted data