write all code