---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
from the "diamond trax" sampler