adding categories functionality