Why are you invoking assignedTMF? Don't invoke it (omit the parentheses) so that you return the pointer to the function itself rather than the return of the function invocation (erroneously cast to a pointer).

You can always test your TMFs to make sure they work, too.