refactored toolbar & dialog