a minor error in the variable naming is fixed
Refactoring. Drive test.