start on a sweep algorithm -- needed for out-of-core and large dataset processing