Added initial concept for threading