gave some variables more descriptive names
fixed a spelling error