feach for addclasses on element was adding index as a class