fixed ClassTag in mapPartitions