Added support for using a function on the output option (issue #1)