code cleaned in HCatUtil. Added switch case.