updated with popupmenu