removed orig timestamp-tally function, and modified val template