Initial commit of residual income function