final serial version before concurrent version