Moving to Foreach instead fo partitionPersist operation