refactor and add output chaining