added support for fetchCategories (transaction from database)