Add doc and assign var by ref

Change-Id: Ifb77baf9b482836ec52b2cdbd3bd4a5134455e7a