Calculating cohomology groups of moduli spaces of curves via algebraic geometry