fixing variable naming bug