correctly getting name of the element