updated filter cards function