updated the function file for investment