added card constructor function, added prototype function & the card template