added sig term handling