move template string binding out from while loop
use space key to commit candidate