add no thread method and example code