adding parellelization functionality