implemented timestamp check