smarter regex
use set
added stat.py