Updated for Spark

Updated for Spark