initial cut at beam search over memms