Make the output method public to use in bindings

A lua binding of this library is better built on top of this lower level mehtod