writing code to editor