refactoring / tweaks