Add documentation for the addGlobal method