<pre>on goNext  if the number of marked cards > 0 then    if the optionKey is down then go to last marked card else go to next marked card  else    if the optionKey is down then      if the shiftKey is down then go to last card of this bkgnd      else        get min(the number of cards,the number of this card + 10)        go to card it      end if    else      go to next card    end if  end ifend goNext</pre>