implemented simple with multithreading