add convenience function for signal handling