adding signal handler