rearraging table replacing id with class