Updating demo code with v 8