refactoring tweaks