added auto-completion mechanism