Changes from getVar('elements') to getVar('elementsWithData')