test serial code