adding the populate DB function in case of no data