added functionality to add card view