use a completion function rather than a table