wrong variable declaration corrected