add writing function w/o image