#31 database errors fixed, #32 still has errors