Added support for different types of category