minor refactoring. removes unneeded variable assignments