Maybe the above could have expected input and output, and if output is undefined it defaults to input wrapped in an array?