update serial code