Added method for parsing output + unit test