Liberty Northwest Insurance Corporation appeals an order requiring it to pay a pro rata share of its *82insured Kathryn Desmond's attorney fees incurred in a lawsuit Desmond brought against a third party tortfeasor. Liberty contends that the trial court lacked jurisdiction, thus its order is unenforceable. Alternatively, Liberty contends that the trial court erred in determining that Liberty had an obligation to pay a share of Desmond's attorney fees.
I
On April 30, 1988, Kathryn Desmond was injured when her car was rear-ended by Nicole Larson's car. Allstate Insurance Company insured Larson, and Liberty Northwest Insurance Corporation insured Desmond. Desmond's insurance policy included up to $10,000 for medical expenses and $10,000 for lost wages.
On June 28, 1988, Desmond retained John M. Graham to represent her in her personal injury claims. On July 15, 1988, Graham wrote Liberty requesting "personal injury protection" (PIP) payments for Desmond. Because Graham was proceeding on Desmond's behalf against Larson, Graham also offered to represent Liberty on a contingency basis for any subrogation claim it might have against Allstate. Liberty responded on July 27, 1988, confirming Desmond's PIP coverage and stating that it would represent itself in its subrogation claim against Allstate.
Liberty began paying Desmond PIP benefits in July 1988. After several months, Liberty apparently stopped making these payments, and Desmond took the matter to arbitration to compel Liberty to continue making PIP payments. Desmond prevailed in the arbitration, and Liberty resumed the payments.
On September 9, 1988, Liberty sent Allstate a memo promising to "forward substantiation for rental and PIP upon receipt." On August 1, 1989, Liberty wrote Allstate, updating the status of its PIP hen, which at that time was $18,646.18 in medical expenses and lost wages. On February 5, 1990, Liberty notified Allstate of its final PIP hen, which totaled $19,984.43.
*83Meanwhile, in February 1989, Desmond had commenced an action against Larson to recover for injuries sustained in the accident. On March 20, 1990, Desmond also filed a complaint against Liberty to compel arbitration under the underinsured/uninsured motorist (UIM) provision of her insurance policy. Desmond argued that she was entitled to UIM compensation because Larson was an underinsured motorist.
Ultimately, Desmond settled with Larson for $60,000 in July 1990. Allstate issued a $40,015.57 check payable to Desmond and Graham. Allstate also issued a $19,984.43 check payable to Desmond, Graham and Liberty. The second check represented Liberty's PIP payments to Desmond.
On October 9, 1990, Desmond filed a motion in the UIM action to determine reasonable attorney fees and to disburse funds. Desmond asked the trial court to allow her to place the $19,984.43 check made out to Desmond, Graham and Liberty into the registry of the court. Desmond also asked the trial court to enter an order requiring Liberty to pay a pro rata share of her attorney fees ($6,661.48) and costs ($623.15) for a total of $7,284.63.
Graham submitted an affidavit to the trial court in support of Desmond's attorney fees. Graham asserted that the prosecution of Desmond's claim resulted in his expending more than an estimated 225 hours of legal work and litigation costs of $1,869.46. This total included Graham's work on the PIP arbitration, the UIM action against Liberty and the personal injury action against Larson.
Graham took the position that although Liberty did not agree to have him obtain Liberty's PIP payments from Larson’s carrier, Liberty's efforts had been insufficient to secure repayment. Graham claimed that it was necessary for him to expend substantial time and effort persuading Larson that Desmond's injuries were proximately caused by the accident. In addition, Liberty did not substantiate to
Allstate that its PIP payments were for injuries sustained *84in the accident with Larson or that Desmond's bills were reasonable. In fact, in the PIP arbitration, Liberty had taken the same position Larson took, i.e., that Desmond's injuries were not proximately caused by the accident. Thus, Graham asked the court to conclude that his services benefited Liberty and were reasonably necessary to its recovery.
Liberty, on the other hand, contended that the terms of Desmond's insurance policy with Liberty and RCW 7.04 governed the UIM arbitration and that neither allowed the trial court to award attorney fees in a UIM action for a subrogation hen collected in a lawsuit filed against a third party tortfeasor. In addition, Liberty asserted that Graham's fees derived from the suit against Larson and would have been incurred regardless of Liberty's subrogated interest. Liberty took the position that it would have collected its subrogation hen from Allstate even in the absence of Desmond's suit against Larson. Liberty thus argued to the trial court that it did not benefit from Graham's work and that Graham's efforts were not reasonably necessary to its recovery from Allstate.
On October 19, 1990, the trial court ordered Liberty to pay the attorney fees and costs Desmond requested. The trial court ordered the $19,984.63 check to be paid into the registry of the court. The trial court also ordered that Liberty receive a check for $12,699.60 and that Graham receive a check for $7,284.63.
Liberty appeals.
II
On appeal, Liberty first contends that the trial court lacked jurisdiction to rule on Desmond's motion to assess attorney fees. A challenge to the court's jurisdiction may be raised for the first time on appeal. RAP 2.5(a). Although Liberty attempts to characterize its contention as jurisdictional, its claim is without merit.
The essential elements of jurisdiction are threefold:
(1) the court must have cognizance of the class of cases to which the one to be adjudged belongs; (2) the proper parties *85must be present; and (3) the point decided must be, in substance and effect, -within the issues before the court.
State ex rel. New York Cas. Co. v. Superior Court, 31 Wn.2d 834, 840, 199 P.2d 581 (1948).
Liberty does not claim that the trial court lacked jurisdiction over the subject matter of Desmond's claim for attorney fees against Liberty. Furthermore, at oral argument, Liberty conceded that the proper parties were before it. Liberty apparently contends that the third element of jurisdiction is absent because Graham's fees incurred in Desmond v. Larson are not within the issues of the underinsured action, Desmond v. Liberty. Therefore, Liberty contends, Desmond must file a separate action against Liberty to address the question of fees. We disagree.
As Liberty concedes, the issue of whether Liberty should contribute to payment of Desmond's attorney fees to Graham may be litigated under Desmond's name. Liberty's only complaint is, in essence, that the trial court erred in allowing Desmond to add another issue in her UIM action against Liberty. This does not implicate a jurisdictional issue. Although Desmond did not formally move to amend her pleading in the UIM action, her motion to add the claim for attorney fees from the negligence suit to the UIM action was the constructive equivalent.1
Ill
Liberty next contends that the trial court erred in granting Desmond's motion to recover a portion of her attorney fees because Liberty did not benefit from Graham's efforts and because Graham's efforts were not reasonably necessary to its recovery.
In Pena v. Thorington, 23 Wn. App. 277, 595 P.2d 61, review denied, 92 Wn.2d 1019 (1979), an insured recovered *86damages from a tortfeasor for injuries incurred in an auto accident. Pena's attorney offered to represent the first party insurer in obtaining repayment for its PIP payments to the insured. The insurer declined the offer, and, in fact, expressly disassociated itself from Pena's personal injury action. It then sought a guarantee from the third party insurer for payment for its subrogation interest and forwarded medical bills directly to the third party insurer. Pena, 23 Wn. App. at 278-79.
The court held for the insurer and denied the insured's claim for attorney fees, concluding that the efforts of Pena's attorney did not benefit the first party insurer because neither insurer had challenged liability. The court also noted that the first party insurer declined Pena's offer of representation and instead actively pursued its claim itself. The court concluded that Pena's attorney had been motivated to secure adequate recovery for his client and thereby attorney fees for himself, not reimbursement for the first party insurer. However, the Pena court acknowledged that where an insured's attorney benefits the subrogee, and where the attorney’s efforts are "reasonably necessary" to its recovery, the insured may recover a pro rata share of his attorney fees from the first party insurer. Pena, 23 Wn. App. at 281-82.
Here, the record was inadequate to allow the trial court to determine whether Graham's efforts benefited Liberty or were reasonably necessary to Liberty's recovery. Although proof of the causal connection was necessary to Desmond's recovery, it may not have affected Liberty's subrogation rights. We therefore remand to the trial court to take such further evidence as will permit it to properly make this determination. In order to decide whether Liberty would have recovered its subrogation claim without Graham's efforts, the trial court should consider, among other things, the specific language of Desmond's insurance policy with Liberty. The policy's terms may detail the relative responsibilities of each party with regard to Liberty's recoupment of its PIP payments and may expressly state how their respec*87tive interests interplay. The trial court should also consider any agreements, contractual or otherwise, between Liberty and Allstate which would bear on the issue of whether efforts by any other third parties were necessary in order for Liberty's interest to be protected. The interrelationship between insurers might be probative of whether Graham's efforts were necessary to Liberty's recovery.
If the trial court finds that Graham is entitled to his fees, it must then determine whether the amount he requests is reasonable. In order to do so, the trial court may determine that more detailed fee affidavits from Graham are necessary both for substantiation and segregation of his attorney fees claim.
Reversed and remanded.
Liberty does not assign error to the trial court's ruling allowing Desmond to add her attorney fees claim. In any event, allowing amendments is within the trial court's discretion and permission to amend "shall be freely given when justice so requires." CR 15(a); Culpepper v. Snohomish Cy. Dep't of Planning & Comm'ty Dev., 59 Wn. App. 166, 169, 796 P.2d 1285 (1990), review denied, 116 Wn.2d 1008 (1991).