moved cid so that other functions can use it in category.js