added populate_db method