added contribution by stefano