Generalized Brownian motion and anomalous diffusion