additional code for creating intermediate RDD