avoid allocate new Function1 objects

and avoid create same anonymous Function1 classes