dialog box functionality with some time cases added