working on sod calculation code