The defendant Hall pleaded guilty to aggravated burglary (R.S. 14:60) and attempted forcible rape (R.S. 14:42.1,27). He was sentenced to prison for 25 and 15 years, respectively, with the sentences to run consecutively. The defendant appealed his sentences as excessive, complaining particularly of the fact they were to run consecutively rather than concurrently.
According to the evidence, the defendant entered the victim’s dwelling in the early morning hours, armed with a knife. He discovered the victim in the kitchen getting milk for her one year old child. The defendant grabbed the victim, beat her, and began sexually assaulting her. The victim’s mother awakened and threatened the defendant with a cane. The defendant fled, dropping his knife and knocking down the baby.
Investigation revealed defendant’s suspected involvement in a number of crimes. He was later apprehended and charged with one count of aggravated rape, two *754counts of attempted aggravated rape, and one count of aggravated burglary. Other charges against him were also pending.
Pursuant to plea negotiations, the 25 year old defendant pleaded guilty to one count of aggravated burglary and one count of attempted forcible rape, with the understanding that the maximum sentence imposed would not exceed 45 years. All other counts or charges were dropped and all other pending cases were dismissed.
The maximum imposable prison sentence for aggravated burglary is 30 years and for attempted forcible rape is 20 years. Prior to entry of the plea of guilty, the defendant was specifically advised of his exposure to a potential prison sentence of 45 years.
After considering a presentence report, the trial judge at the sentencing hearing reviewed the facts of this case, observing that the victim was injured by the defendant and that her baby was knocked down; that the crimes were unprovoked and indicated a violent intent; and that the record contained no expression of remorse by the defendant. The defendant further admitted to being a regular drug user. Also noted was the fact that several of the charges pending against the defendant were punishable by life in prison.
Also reviewed were mitigating factors of age, graduation from high school, attendance at the time of arrest at American College, periods of employment, and the absence of a juvenile record.
The trial judge concluded by noting defendant had committed two serious crimes, had demonstrated a propensity for violence, and was obviously a danger to society. Consequently, prison terms were warranted. Considering the viciousness of the acts and the benefits gained from the plea bargain, consecutive sentences were deemed appropriate.
A sentence is constitutionally excessive if it is grossly out of proportion to the seriousness of the offense or nothing more than a purposeless and needless infliction of pain and suffering. State v. Bonanno, 384 So.2d 355 (La.1980). The trial judge has wide discretion in the imposition of a sentence within the statutory limits and such a sentence should not be set aside as excessive absent a manifest abuse of discretion. State v. Square, 433 So.2d 104 (La.1983).
As defendant correctly argues, where two offenses arise out of a single course of conduct, concurrent rather than consecutive sentences are favored, State v. Cox, 369 So.2d 118 (La.1979), “in the absence of a showing that the public safety requires a longer sentence.”
However, in selecting an appropriate sentence the trial judge is not limited to considering only a defendant’s prior convictions, but may properly review all prior criminal activity. State v. Palmer, 448 So.2d 765 (La.App. 2d Cir.1984), writ denied, 452 So.2d 695 (La.1984). Where the defendant has pleaded guilty to an offense which does not adequately describe his conduct the trial court may, in the exercise of its discretion and for reasons explicated, impose the maximum sentence. This is particularly true in cases where a significant reduction in potential exposure to confinement has been obtained through a plea bargain and the offense involved violence against a victim. State v. Harden, 506 So.2d 1265 (La.App. 2d Cir.1987).
In situations where plea bargains have been made and the sentences imposed were in accordance with these negotiations, this court has affirmed those sentences with the rationale that a defendant cannot complain of the excessiveness of sentences agreed upon in advance. State v. Green, 480 So.2d 883 (La.App. 2d Cir.1985); State v. Owens, 426 So.2d 367 (La.App. 2d Cir.1983).
In this case, a ceiling of 45 years imprisonment had been negotiated even though the maximum sentence defendant could have received for one of the offenses was 30 years in prison. Therefore, it was obviously understood the sentences could run consecutively. Furthermore, charges were dismissed on which defendant, if convicted, could have been sentenced to prison for life.
*755Consequently, in view of all the circumstances of this case, and particularly the plea negotiations agreed upon, we do not consider the sentences imposed to be excessive. For these reasons, those sentences are affirmed.