made a separate function for just reacting to improve nested lines in
the useCard() function.