Created custom flattening class method which takes care of underscore issue