add some code about signal.