adding styling and logic for cards