added gif functionality