First working parallel version