modified handling the timestamp