modified rs and lw to compare with gibbs