changes to r and add r1