fixed camelcasing and issue with erroneous number of segments in hash