finish the r example