changed api, added populateDb file