prioritize document bpoundaries
bug fix #24
bug fix #19