fixed an error in using the wrong  variable, and made that useage more clear