use thread task in the handler