add popup menu code