added models.js implementation
Using Card model instead of Card object function