try to cleanup autocomplete extracted some helpers