making classes into db tables