fixed syntax error, added autocomplete code