Custom serial implementation.