fixes normalise function