added enable attribute functionality