fixing variable declaration