add tie demo code