changes in dictionary comparision and create HTML