replaced named delegates by Func<...>