Implemented custom dialog.