restores order