cutting down on code to reiterating on card animation functionality