Try to work with threads
Edit some code