some code for generating quarterly rather than monthly variables. Not pretty.