added codes to run the tasks simutanously