added timestamp check