make functionality for autocomplete

add controller and new script file for auto complete functionality.