Gencat implemented. Better gencat1.