updated for spark-1.1.1