Added threads! not sure if works though