refactoring on the spec side done