Adds output fn and passing test.