implement category total