changed the anchor elements to spans in the button generation code