Refined both concurrent and serial version