changed card to constructor