improved threading and launch file