refactoring of specs