An alternate approach is proposed in pull request #6 .