integrating libgif stuff