update subrange to handle value 0
Merge pull request #29 from ahamid/subrange_0

update subrange to handle value 0