check the output is correct