simplify timestamp calculation
oops ... forgot terminator
minor tweaks ... revert some of last commit