Made custom factory parameter a delegate.