refactors specs