factor out mess spark-ec2 branch