Code for parallel processing term project