beamscan algorithm

before you sleep