change pass Function object from value to const reference