image normalization added with tests