Made main program loop execute in parallel