modify distance normailization