added advanced timestamp hadling