make changes to code from the lower left of the r