updated auto-complete functionality