Added functionality to popup menu