added signal handlers for text