autogenerated code works better for visa and serial