slightly modified version of eschnour's web-flight to run on EC2