changes to NPV function