correcting for reversed order