Add beam search