this problem is so damn tortuous.