Changed generator behaviour (two functors)

One functor is called before medici test and one after it