added missing functions for completely setting up database