additional variable refactoring, more simplifications