update read code, legend