replace stream with parallelStream