updated norm() to latest branch code