Modal dialog box functionality implmeneted