rewrite serial