fixed some more issues with variable naming/usage