some changes to the RF tutorial, including code