added gif writer (doesn't work properly yet)