update for begin-mode -> primitive-type