added printing and jpeg writing