added output handler