WriteCode sample