Refactor and flesh out put method