typedef turned into a class