Allow displayCategory to be a function