added code to get spark context in IndexedRDD