updated code so degree distributions are created on a monthly basis