added methods to dialog