added a new UDF getMainCategory and fixed NullNormalizer