fixed mistake where I was using the same variablke name twice