modify codes card algoritm and update slides