added writegif