fixed typo, changed variable names a bit more