partially refactored. integration and single month tests passing