Added categories array and used index as ID