minor refactoring in specs