Cekees/l2 norm avg fix

the mean should be inside the sqrt