close thread..........................................................................................................