refactor + specs