Both serial and parallel version working