fixed a bug (bad code) causing values to be passed incorrectly to utility function