refactor specs so tests pass