Appeal from an order of the County Court of Warren County (Scarano, Jr., J.), entered November 29, 1996, which partially granted defendant’s motion to dismiss the indictment.
Defendant, an attorney duly licensed to practice in New York, is the subject of a three-count indictment charging him with bribe receiving by a witness, conspiracy to testify falsely and misconduct by an attorney. The indictment was the result of a meeting on November 5, 1995 between defendant and Edwin Dalston, which was secretly tape-recorded by Dalston. Dalston, the father of a 14-month-old daughter born to his former paramour, Karen Reilly, was involved in a Family Court proceeding with Reilly concerning custody of the child. Defen*840dant, who had previously not only represented Reilly but also had a personal relationship with her, telephoned Dalston on November 2, 1995 and offered to provide negative information about Reilly in connection with the Family Court custody proceeding in return for a payment of $500. As a result of this call, Dalston, together with his sister, met with defendant at a restaurant in the Town of Queensbury, Warren County, on November 5, 1995 and paid defendant $400. The recording of the meeting, along with Dalston’s testimony, formed the basis for the indictment. Thereafter, defendant’s motion to dismiss the indictment based on insufficient evidence was partially granted by County Court, which dismissed count one (bribe receiving by a witness) and count three (misconduct by an attorney). The People now appeal.
A Grand Jury may indict only if the evidence before it is legally sufficient, which is defined as competent evidence which, if accepted as true, would establish every element of the offense charged (see, People v Labor, 221 AD2d 783, 784, lv denied 87 NY2d 923; see also, CPL 70.10 [1]). The sufficiency, of the People’s presentation must be judged by viewing the evidence in the light most favorable to the People, which, if unexplained and uncontradicted, would warrant conviction by a trial jury and all questions regarding the quality or weight of the proof should be deferred (see, People v Jennings, 69 NY2d 103, 114-115; People v Rider, 115 AD2d 123, 124). The fact that the proof presented to the Grand Jury may also be susceptible of the inference of innocence is immaterial as long as the Grand Jury could have rationally drawn an inference of guilt, and the weight to be accorded the evidence presented is exclusively within the province of the Grand Jury and not the court (see, People v Jensen, 86 NY2d 248, 252).
To establish the offense of bribe receiving by a witness, the People were required to present evidence that defendant, a person about to be called as a witness in an action, solicited, accepted or agreed to accept money from Dalston upon the understanding that his testimony would thereby be influenced. The gravamen of the crime is the agreement or understanding under which the witness accepts or agrees to accept a benefit, not the payment of money, and there is no requirement that the testimony actually be influenced (see, People v Harper, 75 NY2d 313, 317). It is defendant’s state of mind that is controlling and the results of the agreement or understanding are immaterial (see, People v Souvenir, 209 AD2d 455, 456, lv denied 85 NY2d 914).
The record indicates that defendant told Dalston that if he *841was subpoenaed he would testify that certain information he had obtained about Reilly while acting as her attorney was neither obtained as a confidence nor as a secret. He provided Dalston with the name of Reilly’s psychiatrist, advised him to contact a psychiatric facility for additional information and further advised Dalston that if anyone learned that he had given this information to Dalston he would deny everything. Based on our review of the entire record, we find that there was legally sufficient evidence to sustain the charge of bribe receiving by a witness in violation of Penal Law § 215.05 (a).
Count three of the indictment charges defendant with violating Judiciary Law § 487 (1), which states in pertinent part that an attorney who is guilty of any deceit or collusion, or consents to any deceit or collusion with intent to deceive the court or a party, is guilty of a misdemeanor. In addition to its penal provisions, this statute also authorizes a civil action for treble damages. Although there is a dearth of criminal cases brought under Judiciary Law § 487, numerous actions have been commenced under this statute seeking money damages. In these civil actions, courts have generally held that this section is limited to actions by an attorney acting in his or her capacity as an attorney and that the mere fact that a wrongdoer is an attorney is insufficient to impose liability (see, Northern Trust Bank v Coleman, 632 F Supp 648, 651; Gelmin v Quicke, 224 AD2d 481, 482-483). Since a statute should be construed as a whole and all portions should be read together to determine its fair meaning (see, McKinney’s Cons Laws of NY, Book 1, Statutes § 97), we are persuaded that criminal actions brought against an attorney under Judiciary Law § 487 should be limited to situations where an attorney was acting as an advocate representing a client and not as a witness. Therefore, since defendant was not acting as an attorney in his transactions with Dalston, we find that County Court properly dismissed count three of the indictment.
Mikoll, J. P., Crew III and Yesawich Jr., JJ., concur. Ordered that the order is modified, on the law, by reversing so much thereof as granted defendant’s motion dismissing count one of the indictment; motion denied to that extent and said count is reinstated; and, as so modified, affirmed.