refactor card view