added contextmenu logic