update, and reconstruct code