added support for more than one category id when passed an array