fbpool.py refactoring