refactoring to move all GA-specific code into ga.py