card logic update