refactor rspecs