swapped variable names in test and core to reflect actual ordering