joli's modification in branch only