separate out thread listener