multithreaded and changed the output of everything to match the assignment specifications