added popup dialog box and menu system