imported gauge code