implemented gif saving