Updating code to reflect revised paper