added data attribute functionality