The X-ray emission from Swift J1644+57 is not steadily decreasing instead it shows multiple pulses with declining amplitudes. We model the pulses as reverse shocks from collisions between the late ejected shells and the externally shocked material, w
hich is decelerated while sweeping the ambient medium. The peak of each pulse is taken as the maximum emission of each reverse shock. With a proper set of parameters, the envelope of peaks in the light curve as well as the spectrum can be modelled nicely.
The extremely bright optical flash that accompanied GRB 080319B suggested, at first glance, that the prompt $gamma$-rays in this burst were produced by Synchrotron self Compton (SSC). We analyze here the observed optical and $gamma$ spectrum. We find
that the very strong optical emission poses, due to self absorption, very strong constraints on the emission processes and put the origin of the optical emission at a very large radius, almost inconsistent with internal shock. Alternatively it requires a very large random Lorentz factor for the electrons. We find that SSC could not have produced the prompt $gamma$-rays. We also show that the optical emission and the $gamma$ rays could not have been produced by synchrotron emission from two populations of electron within the same emitting region. Thus we must conclude that the optical and the $gamma$-rays were produced in different physical regions. A possible interpretation of the observations is that the $gamma$-rays arose from internal shocks but the optical flash resulted from external shock emission. This would have been consistent with the few seconds delay observed between the optical and $gamma$-rays signals.