separate serial and parallel versions