working on making epoch reference more robust