TDS logic (again again) | ScratchStats