refactored tests
corrected some incorrect variable names that were inadvertently changed by R#