the scale table code had the incorrect variable as output