Adding possibility to define flavor by a lambda