refactor output into month class