Max/MSP - mutliple serial read

Hi there,
anyone tried to do this with processing? Benoit has been helping out but I'm still not having that much luck.
I'm basically usingthis code (slightly altered ):

http://webzone.k3.mah.se/projects/arduino-workshop/projects/arduino_meets_processing/instructions/ultrasound.html

to read from two ultrasounds on pins 6 and 7 on the i/o.
I have tried formatting the messages as discussed above, i.e:

serialWrite ('A');
printInteger (sensor1);
serialWrite (10);
delay (20);
serialWrite ('B');
printInteger (sensor2);
... and so on.

I can see that the data from both sensors is getting through to processing, yet one is domminant, the other only appears in processing every 8th - 10th line.

any ideas or do you think this is this more of a processing question?

(i hope) this is the relevant processing code:

if(serial!=10) {
buf += char(serial);
} else {
//extract the value from the string 'buf'
buf = buf.substring(1,buf.length());
//cast the value to an integer
value1 = int(buf);
buf="";
}

any help greatly appreciated.

will.