Arrange populate database using promises