further work to make a first thread working from an externally aplication