wrong variable name corrected