added local normalisation code
Merge branch 'normalisation'