Fixed the example file so that it uses the same instance of the database object rather than creating a new one