introduced objects
added function to generator class