clean up old legacy code for old serial API