Made the initial investment value a parameter