refactor, adding name property to card