creating and registering context menu
end of chapt 18