rebuild the database