Better recursive scanning