still needs some more work but looks promising.

see attached file.