When i write code oitside of function everything is fine, but when i create a function, autocomplete inside this function stoped working!