added code for running the code on the GPU using CPU's, is commented out