spec: refactor