improved running spark programs