added output processing