little tweaks refactoring