implemented generating gif