How can I pass the function by delegate to another function which can call it? Added to description for context.