this algorithm might have some hope, completely untested, but it might
work