added calculation of SSIM to output