new category calculation stuff