corrected variable errors