init with db