add dialog method to dialog prototype