use input thread