refactor code use iplant dialog