add query ichains and use it in completions