debugged ImageNormalizer code