card display logic