implement code for context menu