use array_pluck instead of lists to perform one query for category instead of two