made changes to the tasks in the signal_handler