fixed bug in previous commit (variable name correction)