Created db module and get_latest_data function