Text this: A Galerkin finite element method to solve fractional diffusion and fractional diffusion-wave equations