fix algo to only count finished matches