Code working again after changing the way db is set up