added output handler for outputs