The issue of justice and women offenders came to the fore again this week with the visit of Baroness Vivien Stern to the Scottish Parliament.

A noted penal reformer, she was speaking at Holyrood at the invitation of Jean Urquhart MSP, and unsurprisingly argued that prison is the wrong way of dealing with women who end up at the wrong end of the justice system.In fact, she went further pointing out that many women caught up in the criminal justice system are themselves often victims of crime and injustice and often afflicted by poverty or illness as well.

Following a volte face over the issue of women's prisons the Scottish Government announced in June that 309 capacity HMP Cornton Vale will be closed and replaced by smaller units, including a new 80-capacity prison in the same location to house only the most dangerous prisoners, and another five smaller regional units.

This was after justice secretary Michael Matheson's predecessor Kenny MacAskill had found himself in the bizarre position of defending plans for a new £75m prison for women, HMP Inverclyde, in Greenock - in defiance the direction of official policy and several expert reports.

Having steered the Government through a U-turn on this, Matheson received plaudits south of the border, hailed in the press as far sighted and progressive.

I've talked to a number of people, incidentally, who regret the throwing out of the Cornton Vale project. Working with partners the Scottish Prison Service was proud of what it had drawn up for HMP Inverclyde, a genuinely modern vision of what a larger women's prison might be.

But the question is how many women really need to be locked up? As I reported this week Strathclyde University Professor Cyrus Tata has warned that prison-based rehabilitation has been improved to the extent that some sentencers might make use of imprisonment even where crimes do not justify it.

He was concerned, he said, particularly about women offenders. It is plainly bizarre if, as Professor Cyrus suggests, social workers or sheriffs might be tempted to give women affected by domestic violence a prison sentence to 'give them a break', or to similarly hope that a jail term will help them with a drink or drugs problem.

There is a lot of interest in the imprisonment of women at present, because much is still to be decided about the way forward. Baroness Stern's view is that many women who end up in prison do so because of failure of health, housing and social services to meet their needs.

But if we don't want that to happen, better health, housing and social services will be necessary, especially to intervene before women come to offend. Innovative third sector and partnership approaches also exist - a number featured in entries for the Herald's Society awards this year. (Look out for the shortlist in tomorrow's paper).

But such services are all under budgetary pressure at the moment. Will Mr Matheson's new prison units swallow up the whole £75m which was to have been spent in Greenock? It would be nice to think that some pocket change could be reserved for work to tackle poverty, heal substance abuse and divert women from jail.