work in progress. pushing to make the code available on web for Quentin