
799 F.Supp. 296 (1992)
Gary MAGEE, Petitioner,
v.
Salvatore ROMANO, Warden, Suffolk County Jail, Respondent.
No. CV 91-0387.
United States District Court, E.D. New York.
September 16, 1992.
*297 Gary Magee, pro se.
James Catterson, Suffolk County Dist. Atty. by Michael Blakey, Riverhead, N.Y., for respondent.

MEMORANDUM AND ORDER
WEXLER, District Judge.
Gary Magee ("petitioner") petitions this Court for a writ of habeas corpus pursuant to 28 U.S.C. § 2254. Following his arrest for selling cocaine to an undercover police officer, petitioner was charged with Criminal Possession of a Controlled Substance in the Third Degree and Criminal Sale of a Controlled Substance in the Third Degree, in violation of New York Penal Laws §§ 220.16 and 220.39, respectively. Petitioner subsequently entered into a plea agreement in which he pled guilty to Attempted Criminal Sale of a Controlled Substance in the Third Degree and waived his right to appeal in return for a four to eight year prison sentence. He now challenges that conviction on the grounds that (1) it was obtained by a guilty plea which was unlawfully induced or made involuntarily, without an understanding of the plea and its consequences; (2) he was denied effective assistance of counsel; (3) he was improperly denied substitute counsel; and (4) he was denied the right to appeal. For the reasons stated below, the petition is denied.

I. BACKGROUND
Petitioner was arrested on August 25, 1990, after he sold cocaine to an undercover police officer. On August 31, 1990 he was indicted on two class B felonies: Criminal Possession of a Controlled substance in the Third Degree and Criminal Sale of a Controlled Substance in the Third Degree. As a predicate felony offender under Penal Law § 70.06, petitioner risked receiving a sentence of at least six to fifteen years in prison. Rather than proceed to trial, he entered into an agreement in which he pled guilty to Attempted Criminal Sale of a Controlled Substance in the Third Degree, a class C felony. In return for a four to eight year prison sentence, he waived his right to appeal except on grounds of excessiveness of sentence or jurisdiction of the court.
Before accepting petitioner's plea, the state court directly inquired as to whether petitioner understood the consequences of the plea bargain:
MISS HOFFMAN (attorney for the state): Your Honor, the People would consent to that application, with the understanding that at the time of sentence, the defendant be sentenced to an indeterminate period, the maximum being eight years, the minimum being four years, and he waive any right to appeal.
THE COURT: Four to eight would mean the defendant is a predicate felony offender.
MR. SILVERMAN (attorney for petitioner): Yes, he is.
THE COURT: An authorized disposition of sentence if the defendant is a predicate felony offender.
MR. SILVERMAN: Yes, I believe him to be a predicate felony offender, Your Honor.
THE COURT: Mr. Magee, did you hear what your lawyer said?
THE DEFENDANT: I heard what he said.
THE COURT: You heard what she said.
THE DEFENDANT: Uh-huh.
THE COURT: And it's a negotiated plea. You're waiving your right to appeal, and that you wish to enter a plea to this charge of Attempted Criminal Sale of a Controlled Substance in the Third Degree, a Class C Felony; is that correct, "C"?
MR. SILVERMAN: Reduced to a C Felony.
THE DEFENDANT: Yeah.
THE COURT: You understand?
THE DEFENDANT: Yeah.

*298 THE COURT: I want you to understand fully that by pleading guilty, you are waiving and giving up your right to a jury trial and to confront, that is, cross examine, the witnesses against you. You understand?
THE DEFENDANT: I understand.
THE COURT: Further, that by pleading guilty, you're waiving, giving up, your right against self-incrimination, which means you must tell us what occurred at or about the time the incident happened, on the record, under oath; you understand that?
THE DEFENDANT: I understand that.
THE COURT: Are you willing to do that? Are you willing to do that?
THE DEFENDANT: Yeah. If I know what happened, I'll say what happened.
THE COURT: Well, if you can't tell us what happened, then we will require a trial.
People v. Magee, Indictment No. 1624-90, Transcript of Plea Agreement (County Court, Suffolk County, January 7, 1991) at pp. 2-4.
MISS HOFFMAN: Mr. Magee, in the presence of your attorney, do you now waive any right to appeal this conviction?
THE DEFENDANT: You say I can't appeal this?
MISS HOFFMAN: Except on the grounds of excessiveness of sentence or jurisdiction of the Court, do you agree not to waive this plea  appeal this plea, rather?
(Discussion, off the record between Mr. Silverman and the defendant).
THE DEFENDANT: For today, yeah, I'm waiving my right. I  yeah, I'm waiving my rights.
MISS HOFFMAN: Is that for today, did you indicate?
THE DEFENDANT: I said  you said  you asked me the question, right?
MISS HOFFMAN: Do you agree to waive any rights to appeal this conviction?
THE COURT: You understand you're giving it up for all time? You understand that?
THE DEFENDANT: This turned into a joke.
THE COURT: This is not a game. Be careful, now, friend.
THE DEFENDANT: This turned into a joke.
THE COURT: Be careful. It could be a very, very serious situation for you. Do you waive that right to appeal for all time?
THE DEFENDANT: Yeah, I'm waiving the right.
Id. at 11-12.
In addition, at the time of sentencing, the trial court advised petitioner that he had thirty days in which to file an appeal as to the judgment and sentence. People v. Magee, Indictment No. 1624-90, Transcript of Sentencing (County Court, Suffolk County, February 14, 1991). Petitioner subsequently moved for assignment of counsel and for an extension of time in which to file an appeal. An attorney from the Legal Aid Society was assigned to the case but was permitted to withdraw because of a conflict of interest which arose due to petitioner's expressed dissatisfaction with the Legal Aid attorney who represented him before the trial court. Subsequently, another attorney was assigned to the case and he filed a brief which stated that no non-frivolous issues could be presented on appeal based on the record below. Petitioner made no further attempt to appeal his case in the state system.
Petitioner now bases his claim of ineffective assistance of counsel solely on the allegation that his trial attorney consistently urged him to plead guilty rather than go to trial.

II. DISCUSSION

A. Effect of Petitioner's Waiver of Appeal

Before a federal court may grant a writ of habeas corpus, a petitioner must first exhaust all available remedies in the state court system. 28 U.S.C. § 2254(b), (c); Picard v. Connor, 404 U.S. 270, 275, 92 S.Ct. 509, 512, 30 L.Ed.2d 438 (1971). A *299 petitioner does not satisfy this exhaustion requirement if the claims raised in his petition have not been "fairly presented" to the state courts. Id. To fairly present his federal claims, a petitioner must have set forth in state court all the essential factual and legal allegations raised in his federal petition. Otherwise the state court has not had a fair opportunity to rule on his claims. Daye v. Attorney Gen. of New York, 696 F.2d 186, 191 (2nd Cir.1982).
Petitioner in the instant case has not presented any of his claims to the state appellate courts prior to his filing for federal habeas relief. Moreover, respondent contends that even if petitioner could have challenged the voluntariness of his plea bargain in state court, his failure to do so prior to bringing this habeas petition closed the door on any possible federal remedy.
Respondent argues that petitioner's waiver of his right to a state appeal was deliberate: voluntary, knowing and made under advice of competent counsel. Therefore, respondent contends, this Court should apply the test articulated in Fay v. Noia, 372 U.S. 391, 438, 83 S.Ct. 822, 848-49, 9 L.Ed.2d 837 (1963) which states that when a petitioner has deliberately bypassed the state courts, a federal habeas judge maintains the discretion to deny that party relief, rather than apply the "cause-and-prejudice" standard established in Wainwright v. Sykes, 433 U.S. 72, 97 S.Ct. 2497, 53 L.Ed.2d 594 (1977). See Jackson v. Cupp, 693 F.2d 867, 870 (9th Cir.1982) (when a petitioner's failure to appeal is a deliberate bypass, there is no need for a cause-and-prejudice analysis); Ashby v. Wyrick, 693 F.2d 789, 794 n. 7 (8th Cir. 1982) (same).[1]
In general, a criminal defendant may waive his right to appeal as a condition of a plea bargain. United States v. Rutan, 956 F.2d 827, 829 (8th Cir.1992); People v. Seaberg, 74 N.Y.2d 1, 543 N.Y.S.2d 968, 972, 541 N.E.2d 1022, 1026 (1989),[2] and the waiver is enforceable if it is voluntarily and knowingly made. Rutan, 956 F.2d at 829. Although a waiver prevents a criminal defendant from taking a direct appeal on most grounds, it does not prevent him from challenging the voluntariness of his plea. Such a claim may not be waived. Seaberg, 543 N.Y.S.2d at 971-72, 541 N.E.2d 1022.
A significant factor in determining the voluntariness of a plea is whether the plea was based on the advice of competent counsel. Wilbright v. Smith, 745 F.2d 779, 781 (2d Cir.1984); see also Hill v. Lockhart, 474 U.S. 52, 58, 106 S.Ct. 366, 370, 88 L.Ed.2d 203 (1985) (applying Strickland test for ineffective assistance of counsel to challenge to guilty plea). Because petitioner's first two claims: (1) that his guilty plea was unlawfully induced or involuntarily made without an understanding of the charge and the consequences of the plea; and (2) that he was denied the effective assistance of counsel, both go to the voluntariness of his guilty plea, his waiver of his right to appeal would not have encompassed these claims. Thus, petitioner could have raised these challenges to his guilty plea on the state appellate level.
Under these facts, and especially considering that petitioner was specifically informed by counsel for the state during the hearing on the plea agreement that *300 petitioner's waiver of his right to appeal was applicable to all grounds other than excessiveness of the sentence and jurisdiction, this Court finds the Wainwright "cause-and-prejudice" test to be applicable. Applying that test, the Court finds sufficient "cause" to excuse petitioner's failure to appeal to the state on the issues of voluntariness of his plea and effective assistance of counsel. Moreover, as petitioner's current incarceration is directly related to the plea agreement his attorney advised him to take, petitioner would clearly be prejudiced if his claims have merit. Accordingly, the Court will address the substance of petitioner's first three claims.

B. Voluntary and Knowing Waiver

Petitioner first claims that his guilty plea was unlawfully induced or involuntarily made without an understanding of the charge and the consequences of the plea. It has long been established that in order for a criminal defendant to make a valid guilty plea, it must be both voluntarily and intelligently made. Hill, 474 U.S. at 56, 106 S.Ct. at 369; North Carolina v. Alford, 400 U.S. 25, 31, 91 S.Ct. 160, 164, 27 L.Ed.2d 162 (1970); Boykin v. Alabama, 395 U.S. 238, 242, 89 S.Ct. 1709, 1711-12, 23 L.Ed.2d 274 (1969). To determine the voluntariness of a plea, the court should consider all of the relevant circumstances, including "the possibility of a heavier sentence following a guilty verdict after a trial." Brady v. United States, 397 U.S. 742, 749, 90 S.Ct. 1463, 1469, 25 L.Ed.2d 747 (1970). Other factors to consider include defendant's previous contact with the criminal justice system, see People v. Jandrew, 101 A.D.2d 90, 475 N.Y.S.2d 906, 907 (3rd Dep't 1984), and whether the court addressed the defendant and explained his options. See People v. Gasbarro, 114 A.D.2d 594, 494 N.Y.S.2d 204, 205 (3rd Dep't 1985).
In the instant case, the sentencing court addressed petitioner and explained his options both at the time he pled guilty and at the time of sentencing. Moreover, as a predicate offender, petitioner had sufficient previous contact with the criminal justice system so that he understood the nature of the proceedings and the consequences of his statements. Consequently, the only question that remains is whether petitioner's counsel was so ineffective that petitioner was nevertheless unable to voluntarily and knowingly plead guilty.

C. Ineffective Assistance of Counsel

The test for evaluating claims of ineffective counsel is two-fold. Strickland v. Washington, 466 U.S. 668, 104 S.Ct. 2052, 80 L.Ed.2d 674 (1984). First, "the [petitioner] must show that counsel's representation fell below an objective standard of reasonableness." Id. at 687-88, 104 S.Ct. at 2064. He must also demonstrate that the attorney's errors had some prejudicial impact upon the outcome of the proceeding. Id. at 694, 104 S.Ct. at 2068. Phrased differently, petitioner must show that his counsel's advice was not "within the range of competence demanded of attorneys in criminal cases." McMann v. Richardson, 397 U.S. 759, 771, 90 S.Ct. 1441, 1449, 25 L.Ed.2d 763 (1969); see also Hill, 474 U.S. at 56-57, 106 S.Ct. at 369-70; Tollett v. Henderson, 411 U.S. 258, 266-67, 93 S.Ct. 1602, 1607-08, 36 L.Ed.2d 235 (1972).
In the instant case, petitioner argues that his attorney was inadequate because he consistently urged petitioner to plead guilty rather than go to trial. However, it is uncontested that petitioner's attorney prepared for trial by engaging in discovery. He also assisted in at least three applications for reduction of petitioner's bail, participated in an extensive Sandoval hearing, applied for a Wade hearing, and began jury selection. Considering that petitioner, a predicate felony offender, was charged with two B felonies stemming from the sale of controlled substances to an undercover officer, counsel's advice to petitioner that he plead guilty in exchange for a sentence of four to eight years in prison appears to be able representation of his client. See Mills v. Scully, 826 F.2d 1192, 1197 (2d Cir.1987) (under federal habeas review, there is a strong presumption that counsel made all significant decisions in the *301 exercise of reasonable professional judgment).

D. Denial of Substitute Counsel

Finally, petitioner claims that he was denied effective assistance of counsel when the trial court denied his request, during jury selection, for substitution of appointed counsel. It seems to this Court that petitioner properly waived this issue, thereby precluding habeas review under Fay v. Noia. However, even assuming, arguendo, that this issue is related to the issues of voluntary and knowing waiver and ineffective assistance of counsel, petitioner fails to present any evidence to suggest that his request for substitution of counsel was meritorious and that the decision not to permit it was an abuse of the trial court's discretion. Cf. People v. Sides, 75 N.Y.2d 822, 552 N.Y.S.2d 555, 556, 551 N.E.2d 1233, 1234 (1990) (requiring a new trial where indigent defendant requested a change of counsel and where record indicated a possible irreconcilable conflict between the defendant and his assigned attorney). In any event, because this Court has found that petitioner's initial appointed counsel was not ineffective (indeed, the record indicates the contrary), petitioner suffered no prejudice by the trial court's denial of his request for new counsel.

III. CONCLUSION
Accordingly, for the reasons stated above, McGee's petition for a writ of habeas corpus pursuant to 28 U.S.C. § 2254 is denied.
SO ORDERED.
NOTES
[1]  Although recent Supreme Court cases have applied the "cause-and-prejudice" standard to certain cases previously covered by Fay, see Coleman v. Thompson, ___ U.S. ___, ___, 111 S.Ct. 2546, 2565, 115 L.Ed.2d 640 (1991) ("[i]n all cases in which a state prisoner has defaulted his federal claims ... federal habeas review of the claims is barred unless the prisoner can demonstrate cause for the default and actual prejudice as a result of the alleged violation of federal law"); Keeney v. Tamayo-Reyes, ___ U.S. ___, ___-___, 112 S.Ct. 1715, 1717-19, 118 L.Ed.2d 318 (1992) (applying "cause and prejudice" standard to failure to properly develop a federal claim in state court), Fay still appears to be applicable to cases involving voluntary waiver of state appeals. See Nutall v. Greer, 764 F.2d 462, 464 (7th Cir.1985) ("cases of deliberate bypass or waiver ... should be within the rule" of Fay).
[2]  See also United States v. Marin, 961 F.2d 493, 495-96 (4th Cir.1992); People v. Rodriguez, 192 Mich.App. 1, 480 N.W.2d 287 (1991); State v. Gutierrez, 20 Ariz.App. 337, 512 P.2d 869 (1973); see generally, Annotation  Plea Agreement, Waiver of Right to Appeal, 89 A.L.R.3d 864.
