Updated example to use new methods