improve spec.py demo