tune demo code