modified the custom dialog and made the tool options working