i'm a little embarassed by this answer, but days and days of more elgant code never produced an answer or ran as quickly.