broke out getGif code into parts