Parsing the output, currently needs further work