how am I not using a variable scope correctly?