Updated example to fully function