got a thread to run concurrently with main function