add support for auto-complete mode