card creator new database model and functions