adding the code for timestamping