added function to fetch all data including timestamps