updated functionality of context menu