reformat the code
added autocomplete