more robust algorithm to calculate gap size
Merge pull request #13 from chrox/master

more robust algorithm to calculate gap size