refactor($state): use map function in get()