correct writing code