This seems to work well without (from what I can tell) any lag. Just simplified the search a little bit.