Add gauge code