Phase 1 bf+sr algorithm.