Updated to reverse the output.