sorting function added, html structure and css changed