change window dimensions
split querySegment into querySegment and querySegmentWithCoords
merge with 2.0. Fix bug in querySegmentWithCoords