corrected the calculation for the categorie on a certificate