modified to hardware serial