minor refactor for specs