Surprisngly there still doesn’t seem to be an optimal solution to this other than this brute force approach