refactor for threading

new line for {