use strcasecmp. skeletonize merge_maxsol()