removing logging. refactoring var names