Added approximate code for parallelization