new funtion to get the lastUpdate from Data