To solve a problem, you can try to use threads. And have then you problems two.