add signal handler func