Macroeconomic Fluctuations with heterogeneous agents