pseudo code for LL finished