using single getTimestamp function