add norm square function