Parallel algo

First version of parallel algo