minor refactor of spec