Spectral energy distribution variation in BL Lacs and flat spectrum radio quasars