month change logic