add Output, base, and index