Decay of correlations for nonuniformly expanding systems