change first(), take(n) to has the same behavior as RDD