FoF sourcecode (Washington's FOF, modified by jaime)