check variables to be ordered