Creating and applying variable in the elements