removed some errors related to renaming of variables