started to implement parallel version. Too many unexpected problems :(