changes made in sIDSTask to optimize code and start jobs as foreground