initialize r