unify view functions for cards