couple refactorings