improve database setup