Switch to main method in examples