adding exit signal ahndler