The most senior judge in England and Wales has expressed concern over the rise in the number of sex crimes, but welcomed improvements that have meant more victims are willing to go to court.
Lord Thomas of Cwmgiedd - Lord Chief Justice of England and Wales and head of criminal justice - said: "The difficulty we face at the moment is that the rise in sexual offending is continuing."
The increase was adding to "quite a serious problem", he said.
The judge added it was not for him express a view on "whether there has been a change in social or moral behaviour".
But, though there was still quite a long way to go, there had been improved treatment of witnesses at police stations, and by the prosecuting authorities and in court, that had made people "more willing to take their complaints to court".
Speaking to press and media at the Royal Courts of Justice in London, the judge said: "We have made giving evidence, I think, better."
The judge conceded it was "a horrible experience anyway", but one thing being tried was to enable people "with traumatic stories" to be cross-examined "pretty soon after the events in question, so they can move on in their life".
Defendants were being allowed to have a proper opportunity for cross-examination, but nearer the trial.
Lord Thomas linked the increase of sex crime to an increase in cyber-crime and an anticipated increase in terrorist cases to stress the need to modernise the justice system.
The judge said that "provided we can reform and modernise", he was reasonably confident that "our criminal justice system will cope".
But he warned: "Without proper investment the picture is very, very different".
The judge was asked about reports from the Magistrates Association that more than 50 magistrates recently resigned over criminal court charges that supposedly encouraged defendants to plead guilty to save money.
He said it was "very, very important" that court charges were looked at in the round with all the other charges, including fines, confiscation orders and legal costs, facing people convicted of crimes. Another consideration "must be the means of people to pay".
The judge said: "It is obvious to anyone who sees what is happening that there is a problem with financial penalties as a whole."
Civil court fees had also been rising "at quite a considerable rate". Legal aid costs had also been increasing, and going to court was an expensive process.
Reform was "the only way forward", with modern technology being one way of helping to reduce costs.
Referring to one area of the law - divorce - the judge said it "horrified" him how much separating couples could spend employing lawyers in the family courts to solve complicated issues related to money and children following the break-up of marriages.