changed html tags and script to suit new structure