added function getTimestamp