after flight to SFO implenting most of the rest of the code on the mac. Needs testing on linux boxes in lab.