changed the multiprocessor implementation to be more simple and efficient