pass function name rather than string to final parameter