moved logic.py to apollo.py