added global variable example

Change-Id: I835c76dcb90a1eb2839f970d1874099473dce998