added norm, mse and psnr functions