Allow functions to be passed to cmd