seperate thread for input is unnecessary
realize preview function
show the new block immediately after generated