worked on quering for catagories