sharing functions between serial and parallel have been taken care of