replace generalizer by faster one using lambdas; rename old generalizer to simple