The defendant, Francis M. Souza, was found guilty by a jury of rape, kidnapping, and assault and battery in the Superior Court in Bristol County on June 29, 1977. The defendant was sentenced to serve a term of from fifteen to eighteen years at the Massachusetts Correctional Institution at Walpole (M.C.I., Walpole), on the rape conviction. The other convictions were placed on file. The defendant appealed his sentence to the Appellate Division of the Su*814perior Court Department, which reduced the sentence to from ten to eighteen years at M.C.I., Walpole. Souza filed an appeal from his convictions, and on October 3, 1980, he filed a motion for a new trial, which motion was denied on December 30, 1980. The defendant timely filed an appeal from the denial of his motion for a new trial, and the case was entered in the Appeals Court in July, 1982. The Appeals Court affirmed the convictions and the denial of the motion for a new trial; however, the court vacated the sentence imposed by the judge in the Superior Court and remanded the case for resentencing. Commonwealth v. Souza, 15 Mass. App. Ct. 740, 748 (1983). This court granted the Commonwealth’s application for further appellate review.
We conclude that none of the allegations of error which the defendant first presented on appeal creates “a substantial risk of a miscarriage of justice.” Commonwealth v. Franks, 365 Mass. 74, 76 (1974) (Franks I), quoting Commonwealth v. Freeman, 352 Mass. 556, 564 (1967). We therefore affirm the judge’s denial of the defendant’s motion for a new trial. We agree with the Appeals Court, however, that the case must be remanded for resentencing.
The Commonwealth contends that the Appeals Court erred in vacating the sentence imposed on Souza, and that the judge properly could consider the defendant’s alleged perjury on the witness stand in determining the term of punishment. The Commonwealth also argues that the judge acted within his discretion by taking note of a previously dismissed criminal charge against the defendant during the sentencing hearing.
In accordance with our decision rendered today in Commonwealth v. Coleman, ante 797, 808 (1984), we rule it improper for a sentencing judge to consider a defendant’s alleged perjury at trial. Although we need not decide directly the second issue raised by the Commonwealth, we caution the resentencing judge, in determining the new penalty, not to presume the defendant guilty of any offenses except those for which he stands convicted.
*815The defendant has claimed that several errors arose from the judge’s instructions to the jury. The defendant also claims that the judge and the prosecutor unlawfully retaliated against him for exercising his right to a jury trial. Although the defendant did not seek further appellate review of the Appeals Court’s adverse determination of those claims, we shall consider them briefly.1 We first summarize the events that occurred during the sentencing hearing, which form the basis of the claims raised by the Commonwealth in its application for further appellate review.
During the sentencing hearing, the Commonwealth recommended that the defendant be imprisoned in M.C.I., Walpole, for a term of from fifteen to eighteen years. This sentence was consistent with, and slightly more lenient than, the term which the assistant district attorney said he would recommend upon conviction after trial.2 After asking for the probation report, the judge asked the defense counsel for his recommendations. The defendant’s attorney requested leniency and asked the judge to transfer the defendant to Bridgewater State Hospital for a psychiatric evaluation. The judge expressed his desire to sentence the defendant immediately. He then commented that the defendant should not be punished for proceeding to trial; however, he “certainly [was] going to take into consideration the bold lie that apparently he chose to make about having nothing to do with this woman.”
Subsequently, the judge stated that he was considering imposing a life sentence on the defendant unless he was found, after a psychiatric evaluation, to be insane. The judge then commented that a prison sentence “may age him a bit and slow his proclivities somewhat if he comes out in *816twenty years. That Westport sodomy that was dismissed, I have a copy of the police report in the probation record. Apparently he attacked some man rectally.” When defense counsel emphasized that the charge referred to was dismissed, the judge responded, “Yes. For lack of prosecution.”
After taking note of the remainder of the defendant’s criminal record, the judge decided to send the defendant to Bridgewater on the rape conviction to determine whether he was sexually dangerous. He deferred sentencing on the other charges. The judge then asked the defendant if he wanted to say anything, and Souza replied in the negative.
The Bridgewater evaluation indicated that the defendant was not sexually dangerous. Subsequently, the judge imposed the sentence recommended by the assistant district attorney of from fifteen to eighteen years at M.C.I., Walpole, for the rape conviction, and placed the other convictions on file. Following the defendant’s appeal to the Appellate Division of the Superior Court, the Appellate Division reduced the sentence on the rape conviction to from ten to eighteen years at M.C.I., Walpole.
1. Improper sentencing procedure. On appeal, the defendant argued that the judge impermissibly burdened his right to proceed to trial and to testify by considering the defendant’s alleged perjury in deciding the sentence to impose. The Appeals Court agreed with the defendant, reasoning that the judge’s conduct contravened the law of this Commonwealth. Commonwealth v. Souza, supra at 746-747. See Commonwealth v. Murray, 4 Mass. App. Ct. 493, 496-497 (1976). The court reasoned that, by taking note of the defendant’s allegedly false testimony in determining a sentence, a judge not only endeavors to punish a defendant for conduct other than that for which he stands convicted, but sanctions the accused for going to trial and testifying in his own behalf. Souza at 746. The Appeals Court thus vacated the sentence imposed by the trial judge and remanded the case for resentencing. Souza at 748.
*817In its application for further review, the Commonwealth asks us to adopt the rule of decision in United States v. Grayson, 438 U.S. 41 (1978), as matter of our own common law. We have reviewed such arguments in Commonwealth v. Coleman, supra. There is no need to repeat that discussion here. The facts in this case are on all fours with those in Coleman.3 That decision controls. Although the defendant in this case made no objection, nor did he move to revise and revoke the sentence, Mass. R. Crim. P. 29 (a), 378 Mass. 899 (1979), we conclude that the sentencing procedures utilized here involve a substantial risk of a miscarriage of justice. Commonwealth v. Freeman, 352 Mass. 556, 564 (1967). For the reasons stated in Coleman, the sentence imposed here, to the extent it considered the alleged perjury of the defendant, was improper. It is improper for a sentencing judge to presume a defendant’s guilt and to impose punishment for an untried criminal offense. “[A] sentencing judge may not undertake to punish the defendant for any conduct other than that for which the defendant stands convicted in the particular case.” Commonwealth v. LeBlanc, 370 Mass. 217, 221 (1976). Accord Commonwealth v. Sitko, 372 Mass. 305, 313 (1977); Franks I, 365 Mass. 74, 81 (1974); Commonwealth v. Settipane, 5 Mass. App. Ct. 648, 653-654 (1977); Commonwealth v. Murray, supra. Although the Appellate Division reduced the sentence here, in contrast to the Coleman scenario, this fact does not cure the illegality of the initial process.4
In Commonwealth v. Coleman, decided today, this court has rejected the views espoused by the Court in United States v. Grayson, supra. We construed that decision as *818one dealing with what is permissible under the Federal Constitution and rejected the principles stated by the Court as matter of our own common law. The cases cited here, and in Coleman, demonstrate that this Commonwealth has developed a significant body of jurisprudence contrary to the view expressed in Grayson. We conclude here, as we did in Coleman, that to allow a judge to consider, in sentencing, his belief that a defendant has lied in his defense impermissibly burdens a defendant’s right to plead not guilty and to testify. We also reasoned in Coleman that considering a defendant’s allegedly perjured testimony chills the rights of prospective defendants to testify, based on their fear that a judge may impose a harsher sentence if the defense is disbelieved. Coleman, supra at 808.
We conclude that the remedy of vacating the penalty and remanding the case for resentencing is warranted by the facts in Souza’s case.5
Since the case has been remanded for resentencing, we need not decide directly the issue whether the judge improperly considered, in devising the sentence, what he presumed to be the defendant’s guilt on a previously dismissed charge. We caution the new sentencing judge, however, that he or she may not endeavor to punish the defendant except for those charges on which he stands convicted. Commonwealth v. Souza, 15 Mass. App. Ct. 740, 748 (1983), citing Commonwealth v. LeBlanc, supra at 219. Commonwealth v. Franks, 372 Mass. 866, 867 (1977) (Franks II). Commonwealth v. Sitko, supra. See United States v. Eberhardt, 417 F.2d 1009 (4th Cir. 1969), cert. denied sub nom. Berrigan v. United States, 397 U.S. 909 (1970).
2. Claims of error on the judge’s charge. The defendant claims various errors in the judge’s charge to the jury. We review these claims briefly. The defendant argues that the *819judge, in his charge, misstated the law to such an extent that he confused the jury and reduced the Commonwealth’s burden of proof below a reasonable doubt standard. There was no objection at trial, and, hence, we review to determine if the alleged errors created a substantial risk of a miscarriage of justice. See Commonwealth v. Ferreira, 373 Mass. 116, 126-127 (1977); Commonwealth v. Freeman, 352 Mass. 556, 564 (1967).
In determining whether reversible error has occurred in a judge’s charge, we have reviewed the instruction as a whole, as did the Appeals Court. We conclude, for the same reasons, that there was no error in the charge as to the definition of proof beyond a reasonable doubt. The other claims of error as to the charge are equally without foundation. The discussion by the Appeals Court is clear and ample. We need only refer to it and indicate our agreement. See Commonwealth v. Souza, supra at 741-744. Evaluating each claim of error in the judge’s charge that is alleged by the defendant, we conclude that none of them, whether considered separately or cumulatively, warrants a reversal of the convictions.
3. Penalizing the defendant for pleading not guilty. The defendant asserts that the assistant district attorney and the judge unlawfully retaliated against him for exercising his right to proceed to trial and to testify in his own defense. The defendant claims that the prosecutor recommended a harsher sentence merely because he decided to maintain his innocence and to go to trial. The defendant also argues that the judge penalized him for exercising his right to a trial by accepting the more severe sentence recommended by the assistant district attorney.
During the course of trial, the defendant and the prosecutor made two unsuccessful attempts at a plea bargaining agreement. During the first negotiations, the prosecutor offered the defendant, should he plead guilty, the recommendation of an eighteen-year sentence at the Concord reformatory. If the defendant proceeded through the trial and was convicted, he would then recommend an eighteen *820to twenty-year sentence at M.C.I., Walpole. Admitting that he understood the consequences, the defendant then expressed his desire to continue the trial.
The prosecutor made his offer more attractive at the second round of negotiations by promising to recommend a twelve-year sentence at Concord reformatory in return for a guilty plea. Again, the defendant was apprised of the fact that the offer would terminate once the case went to the jury, and that a subsequent conviction would bring a harsher sentencing recommendation. The defendant decided not to plead guilty at that time.
After the Commonwealth rested, the defendant then decided that he wished to enter a plea of guilty on all of the charges. The judge questioned the defendant concerning the offenses with which he was charged, but the defendant repeatedly maintained his innocence. At this juncture, we note, that the judge acted within his discretion in refusing the defendant’s Alford plea. See North Carolina v. Alford, 400 U.S. 25, 38 n.11 (1970). See also United States v. Bednarski, 445 F.2d 364, 366 (1st Cir. 1971); Commonwealth v. Souza, supra at 747.
Following the return of the convictions, the prosecutor recommended a sentence of from fifteen to eighteen years at M.C.I., Walpole, which was consistent with, and slightly more lenient than, the term mentioned during the plea bargaining negotiations.
A prosecutor may not retaliate against a defendant for pursuing a legal right to a trial. Blackledge v. Perry, 417 U.S. 21, 28 (1974). Similarly, it is unconstitutional for a judge to enhance a defendant’s punishment based on his or her exercise of the right to plead not guilty, or to appeal a conviction. See North Carolina v. Pearce, 395 U.S. 711, 724-726 (1969).
In accordance with Supreme Court precedent, this court has recognized that a prosecutor permissibly may induce a guilty plea in the course of plea bargaining negotiations by promising a more lenient sentence, and by warning that a harsher sentence may be recommended if the defendant *821proceeds to trial and is convicted. Commonwealth v. Tirrell, 382 Mass. 502, 508-509 (1981), citing Bordenkircher v. Hayes, 434 U.S. 357, 363-365 (1978). Commonwealth v. LeRoy, 376 Mass. 243, 246 (1978). See Commonwealth v. Joseph, 11 Mass. App. Ct. 879, 880 (1981). Confronting a defendant with the prospect of a more severe penalty if tried and convicted constitutes an inevitable and legitimate aspect of the plea bargaining system. See Chaffin v. Stynchcombe, 412 U.S. 17, 31 (1973). Therefore, no evidence of vindictiveness appears when a prosecutor promises to recommend a harsher penalty upon conviction, provided that the defendant remains free to accept or reject a plea bargaining offer, and that no charges are imposed arbitrarily upon the accused. See Corbitt v. New Jersey, 439 U.S. 212, 223, 225 (1978); Bordenkircher v. Hayes, supra at 363, 369. Cf. United States v. Goodwin, 457 U.S. 368, 384 (1982) (no presumption of vindictiveness warranted when prosecutor obtained more severe charges against defendant following his decision not to plea bargain and his demand for a jury trial).
The district attorney thus acted within his discretion in recommending, at the sentencing hearing, a harsher penalty than that which he would have recommended had the defendant accepted his plea bargaining offer. The prosecutor was not bound by the terms of his plea bargaining offer when the defendant’s case was submitted to the jury, and the defendant had not relied on the offer to his detriment. See Commonwealth v. Tirrell, supra at 512; Commonwealth v. Smith, 384 Mass. 519, 521, 523 (1981); Blaikie v. District Attorney for the Suffolk Dist., 375 Mass. 613, 616 n.2, 618 (1978). The defendant therefore cannot sustain his claim of prosecutorial vindictiveness. The claim that the judge unlawfully retaliated against the defendant by accepting the prosecutor’s legitimate sentencing recommendation also must fail. See Commonwealth v. Joseph, supra at 881-882; Commonwealth v. Mendez, 8 Mass. App. Ct. 914, 915 (1979).6
*822The defendant’s various allegations of error do not create a substantial risk of a miscarriage of justice. Accordingly, we affirm the trial judge’s denial of the defendant’s motion for a new trial. Because the judge improperly considered the defendant’s alleged perjury in determining the sentence to impose for the convictions, we vacate the defendant’s sentence, and we remand the case for resentencing before a different judge. We choose to remand to a different judge for the reasons stated in Commonwealth v. Coleman, supra at 810 n.15.
So ordered.
All issues briefed and argued before the Appeals Court are before this court on grant of an application for further appellate review, unless the order granting the application prescribes otherwise. See Ford v. Flaherty, 364 Mass. 382, 387 (1973); Ballantine v. Falmouth, 363 Mass. 760, 762 n.2 (1973).
The original recommendation was to be from eighteen to twenty years at M.C.I., Walpole.
The same judge was involved in both trials.
We note that resentencing of the defendant may result in a more severe sentence than the one originally imposed by the Superior Court judge, or as modified by the Appellate Division. Cf. Commonwealth v. Foster, 368 Mass. 100, 108 (1975). But see McHoul v. Commonwealth, 365 Mass. 465, 470-472 (1974) (imposition of more severe punishment on defendant following retrial and conviction may not be prompted by vindictiveness against defendant for exercising right to appeal).
The facts in this case compel vacating the sentence even more strongly than did the facts in Coleman. Coleman admitted the falseness of his testimony, albeit under cross-examination by the judge. Commonwealth v. Coleman, supra at 800-801. By contrast, Souza never stopped maintaining his innocence.
An alleged violation of due process may be sustained against a trial judge who imposes a harsher sentence after the defendant exercises a *822right to a trial, where the defendant proves that the judge coerced a guilty plea by notifying a defendant that a more severe punishment would follow a conviction. Commonwealth v. Damiano, 14 Mass. App. Ct. 615, 618-619 (1982). See Letters v. Commonwealth, 346 Mass. 403, 408 (1963).