refactor UI picker logic