Ok, take your if b commands from your 2nd loop and insert them into your first loop, then make your 1st spofs say spofs 0,x,y