Initial script..will add parallelization to this..
added parallelization to this..