initial commit with Jon Loft's code (recovered from WLABTDT-112IW)