A Bangor man is going to prison for 30 years for sex crimes committed against two minors. Deputy District Attorney Mike Roberts said it’s the largest sentence ever handed down in Penobscot County for a sex offense.Terrence Pinkham, 28, of Bangor changed his plea in a Bangor courtroom on Monday. He had previously pleaded not guilty to five counts of gross sexual assault and two counts of sexual exploitation of a minor.Pinkham now admitts to assaulting a 7-year-old boy, along with his co-defendent and former girlfriend Katie Dube. The couple also admitted to taking sexually explicit cell phone photos of the boy and a female toddler.The district attorney’s office and Pinkham’s defense attorney reached an agreement on the 30-year sentence, followed by 15 years of supervised release.Roberts said, “It reflects the severity of the crimes. It also reflects that over the years the legislature has made it clear to the courts that they are to take these cases more seriously. He’s 28 years old. By the time he gets out of jail he should be well into his 50′s and with 15 years of supervised release, hopefully he won’t be a threat to the community again.”Pinkham chose not to address the court during his sentencing on Monday. His defense attorney Aaron Fethke said he accepted the 30-year sentence.”Terrence, my client, did a bad thing and today he did the right thing and took responsibility for it. We’re prepared to move on. I mean, there were certainly negotiations back and forth on what we thought was fair and what the court would accept and like I said in court, we felt this was a fair sentence,” said Fethke.Pinkham will be listed on the sex offender registry for life.Dube was sentenced in January and is serving 23 years in prison.