edit init DB function.