specs and refactors