refactor specs