calculating investment