fix range based scanner and add range based window tests