made some variable names self describing, corrected a typo