add functions and variables for thread creader
add loadbalancing