added output parsing