fix looping logic
first pass on auto complete