renaming a few variables

as suggested by @memmett