add example and improve advertising support