useful script for spark