fixing renaming, and some variable names