refactor to object + add autocomplete