He also agreed to pay her legal fees.