algorithm 332 GIFs