tests passes with new SPEC api
slightly refactored spec.py