keeps db open