script to run two engines. See comments for details