added segmented scan for ower of 2