added functional html elements (spans and data attr)