This diff is confusing, all I did was refactor part of the logic in get_report to a new function called last_if_none