Reordered solution