Added getTimestamp function