fix logic to move to next card