Updated method demo code