refine how rightclick menu is added.