block generator class