refactored view controller to card view controller