signal handler template