refactorings (need more coffee..)