implement signal handler
add comment