change pass default Function object from value to const reference