added variable renaming