seperated engine.py from DICraft.py