introduce signal handling, really basic implementation