add new logic tutorial code