Found error, got it to run. Need to now update the algorithm