refactored fill.py to use pools, now code is less ugly