updated card code demo