gather.py works but is slow