updated signalhandler