fixing variable names here and there