Implement to use multithreading