fixed variable names as they suit
fixed wrong variable name usage
fixed spelling