added returnCategoires flag