Refactored week loop