add signal handler abstraction